-- GENERATED SPELL FOR [Hulking Abomination] --


function spell0_31140(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31140', 590, 1)
end

function spell1_31140(pUnit, Event) --@Exploding Corpse,n/a--
pUnit:FullCastSpellOnTarget(58995,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31140', 553, 1)
end

function spell2_31140(pUnit, Event) --@Scourge Hook,n/a--
pUnit:FullCastSpellOnTarget(50335,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31140', 1000, 1)
end

function Sorts_31140(pUnit, Event)
local choix_sorts_31140 = math.random(0, 2)
if choix_sorts_31140 == 0 then
pUnit:RegisterEvent('spell0_31140', 1, 1)
end
if choix_sorts_31140 == 1 then
pUnit:RegisterEvent('spell1_31140', 1, 1)
end
if choix_sorts_31140 == 2 then
pUnit:RegisterEvent('spell2_31140', 1, 1)
end
end

function mob31140_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31140', math.random(1500, 3000), 1)
end

function mob31140_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31140_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31140_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31140, 1, 'mob31140_Action')
RegisterUnitEvent(31140, 2, 'mob31140_Leave')
RegisterUnitEvent(31140, 3, 'mob31140_Kill')
RegisterUnitEvent(31140, 4, 'mob31140_Die')
